package com.eascs.p2p.admin.manager.impl;

import java.util.ArrayList;
import java.util.List;

import org.springframework.stereotype.Repository;

import com.eascs.p2p.admin.manager.IAssociateDataManager;
import com.eascs.p2p.common.dao.BaseDao;

@Repository
public class AssociateDataManagerImpl extends BaseDao implements IAssociateDataManager {

	
	@Override
	public List<Object[]> getLoaneerInfo(String keywords){
		
		List<Object[]> list=new ArrayList<Object[]>();
		StringBuffer s=new StringBuffer();
		s.append("select p.id, p.name,p.mobile from p2p_loanee p where 1=1 ");
		s.append(" and p.name like ? ");
		s.append(" or p.account like ? ");
		s.append(" or p.mobile like ? ");
		s.append(" order by p.id  ");
		s.append(" limit 0,10 ");
		list = this.findObjectsList(s.toString(),"%"+keywords+"%","%"+keywords+"%","%"+keywords+"%");
		return list;
	}
	
}
